import axios from "../utils/request";
import { get, post } from './methods'

// 首页---数据请求
// 封装具体请求的方法
// 请求天气
export const getWeather = (version: string) => {
    return get({
        url: 'http://v1.yiketianqi.com/api',
        params: {
            unescape: 1,
            version,
            // appid:'88133611',
            // appsecret:'L9ZYdBjL'
        }
    })
}
// 获取水电用量数据
export const getHydroelectric = () => {
    return get({
        url: '/v1.0/api/intelligentDetection/dataTop'
    })
}
// 获取校园流动人员情况
// /v1.0/api/intelligentDetection/dataBottom
export const staffTurnover = () => {
    return get({
        url: '/v1.0/api/intelligentDetection/dataBottom'
    })
}

// 安全管理---数据请求
// 监控情况接口
export const getSituationApi = () => {
    return axios({
        url: "/v1.0/api/safeManage/monitoringSituation",
        method: "GET",
    })
};
// 门禁情况接口
export const getControlApi = () => {
    return axios({
        url: "/v1.0/api/safeManage/dutySituation",
        method: "GET"
    })
}
// 值班情况接口
export const getDutyApi = () => {
    return axios({
        url: "/v1.0/api/safeManage/entranceGuardSituation",
        method: "GET"
    })
}
// 监控画面接口
export const getVideoApi = () => {
    return axios({
        url: "/v1.0/api/safeManage/monitoringList",
        method: "GET",
    })
};